package interfaces;


import java.awt.Dimension;

import javax.swing.AbstractAction;
import javax.swing.BoxLayout;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JButton;
import javax.swing.JLabel;

import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Container;

import javax.swing.Box;
import javax.swing.JTextField;
import javax.swing.JTabbedPane;
import java.awt.Font;
import java.awt.Insets;
import javax.swing.SwingConstants;
import java.awt.ComponentOrientation;
import javax.swing.JComboBox;


import entidades.Titular;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;

public class ConfirmarEmitirLicencia extends PanelGeneral {

	private static final long serialVersionUID = 1L;
	private BusquedaDeTitularDialogo idBusquedaTitular;
	public JPanel panel_3;
	public PantallaPrincipal p;

	public ConfirmarEmitirLicencia(PantallaPrincipal framePerteneciente, Titular titular) {
		
		super(framePerteneciente);
		p= framePerteneciente;
		setMinimumSize(new Dimension(500, 600));
		setPreferredSize(new Dimension(800, 550));
		setAlignmentY(1.0f);
		setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
		
		setNombreCU("Emitir licencia");
		
		JPanel panelUsuario = new JPanel();
		add(panelUsuario);
		panelUsuario.setMaximumSize(panelLabel);
		
		JLabel lblNombreDelUsuario = new JLabel("#NombredelUsuario");
		panelUsuario.add(lblNombreDelUsuario);
		
		JPanel panelTrabajo = new JPanel();
		panelTrabajo.setMinimumSize(new Dimension(600, 500));
		panelTrabajo.setPreferredSize(new Dimension(600, 500));
		add(panelTrabajo);
		panelTrabajo.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
	
		panelTrabajo.setLayout(new BoxLayout(panelTrabajo, BoxLayout.Y_AXIS));
		this.add(panelTrabajo, BorderLayout.CENTER);
		panelTrabajo.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
		
		JPanel panel = new JPanel();
		panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
		panel.setPreferredSize(new Dimension(600, 500));
		panelTrabajo.add(panel);
		
		Component horizontalStrut_1 = Box.createHorizontalStrut(20);
		horizontalStrut_1.setMaximumSize(new Dimension(500, 15));
		horizontalStrut_1.setMinimumSize(new Dimension(200, 15));
		horizontalStrut_1.setPreferredSize(new Dimension(200, 15));
		panel.add(horizontalStrut_1);
		
		JPanel panel_5 = new JPanel();
		panel_5.setMaximumSize(new Dimension(32767, 90));
		panel_5.setLayout(new BoxLayout(panel_5, BoxLayout.Y_AXIS));
		panel_5.setMinimumSize(new Dimension(500, 20));
		panel_5.setPreferredSize(new Dimension(500, 30));
		panel.add(panel_5);
		panel_5.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
		
		JPanel panel_7 = new JPanel();
		panel_5.add(panel_7);
		
		JPanel panel_6 = new JPanel();
		panel_6.setPreferredSize(new Dimension(600, 35));
		panel_5.add(panel_6);
		
		JButton btnNewButton = new JButton("Imprimir licencia");
		
		btnNewButton.setPreferredSize(new Dimension(200, 28));
		panel_6.add(btnNewButton);
		
		
		JPanel panel_1 = new JPanel();
		panel_1.setMaximumSize(new Dimension(800, 350));
		panel_1.setPreferredSize(new Dimension(800, 350));
		panel_1.setLayout(new BoxLayout(panel_1, BoxLayout.X_AXIS));
		panel_1.setMinimumSize(new Dimension(800, 300));
		panel.add(panel_1);
		panel_1.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
		
		
		JPanel panel_4 = new JPanel();
		panel_4.setMaximumSize(new Dimension(90, 300));
		panel_4.setMinimumSize(new Dimension(300, 400));
		panel_4.setPreferredSize(new Dimension(150, 350));
		panel_1.add(panel_4);
		panel_4.setLayout(new BoxLayout(panel_4, BoxLayout.Y_AXIS));
		
		JLabel lblNewLabel = new JLabel("New label");
		lblNewLabel.setPreferredSize(new Dimension(100, 16));
		panel_4.add(lblNewLabel);
		lblNewLabel.setText(titular.nombre+" "+titular.apellido);
		
		Component horizontalStrut = Box.createHorizontalStrut(20);
		horizontalStrut.setMaximumSize(new Dimension(100, 30));
		horizontalStrut.setPreferredSize(new Dimension(100, 30));
		panel_4.add(horizontalStrut);
		
		JLabel lblNewLabel_1 = new JLabel("New label");
		panel_4.add(lblNewLabel_1);
		lblNewLabel_1.setText("CLASE");
		
		JPanel panel_2 = new JPanel();
		panel_2.setMaximumSize(new Dimension(32767, 60));
		panel.add(panel_2);
		
		/*
		habilitarControles(txtTipoDeDocumento,false);
		habilitarControles(textField_1,false);
		habilitarControles(textField_2,false);
		habilitarControles(textField_3,false);
		habilitarControles(textField_4,false);
		habilitarControles(textField_5,false);
		habilitarControles(textField_6,false);
		habilitarControles(textField_7,false);
		comboBox.setEnabled(false);
		textField_7.setEnabled(false);
		*/
		
		
		
	}
	
	
	 
}
